feat: Implemented pagination to getAllBilling Plans Endpoint #1316
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request implements pagination for the
getAllBillingPlans
endpoint. It addspage
andlimit
query parameters to the endpoint, allowing clients to retrieve billing plans in smaller chunks, improving performance and scalability.Related Issue
Type of Change
How Has This Been Tested?
Test Evidence
Documentation Screenshots (if applicable)
Checklist
Additional Notes
Database Configuration Issues: I encountered significant difficulties setting up the local database connection. I tried [list the things you tried, e.g., different connection strings, different users, different migration strategies], but I was unable to get it working correctly.
Mock Data Source: To overcome this issue and demonstrate the pagination functionality, I implemented a mock data source in the
BillingPlanService
. This allows the API to return paginated results without relying on the database.Then did a test to confirm feature was working then removed the mock data
Assumptions: This implementation assumes that the database connection will be properly configured in a production environment. The pagination logic should function correctly once the database connection is established.
-I have tried my best in doing the task and have asked questions whenever problems arise.